<template>
  <div></div>
</template>
<script>
export default {
  name: 'MiniTask',
  data() {
    return {}
  },
  methods: {
    openMini() {
      const id = 'demo_yx'
      const name = 'MyDemo'
      const iconUrl = 'https://yxweb.hdec.com:8081/mobile-test1/mini/icon.png'
      const url = 'https://fawkes.cybereng.com/#/'
      const data = {
        id,
        name,
        iconUrl,
        url,
      }
      yuanchu?.miniTask?.openMini(data, (err) => {
        Notify({ type: 'error', message: `小程序打开失败：${err}` })
      })
    },
  },
  mounted() {
    if (typeof yuanchu != 'undefined') {
      this.openMini()
    }
  },
}
</script>
<style>
</style>
